home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: 73700.776@compuserve.com (Walter C. Riley)
- Newsgroups: comp.lang.c++
- Subject: Re: How to allocate two dimensional arrays using new?
- Date: Sat, 27 Jan 1996 13:50:51 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4edalm$fil@dub-news-svc-2.compuserve.com>
- References: <4doe5e$jea@nuscc.nus.sg>
- NNTP-Posting-Host: ad60-032.compuserve.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- eng50382@leonis.nus.sg (Zhu Qili) wrote:
-
- >Well, when I was trying to do this in Turbo C++3.0 or Borland C++4.5:
-
- > int *p;
- > p = new int[10][10];
-
- >I get this:
- > "Can't convert int[10] type to int type." :-(
-
- >What kind of compiler allows me to do that? Or is there a way to get
- >round the problem? Please reply me via email. Thanks!
-
- Kenny,
-
- The first line below should explain the message:
-
- int (*p)[10];
- p=new int[10][10];
-
- delete [] p;
-
-
- Good luck,
- Walt
-
-
-
-